package com.lam.common.components.file.model;

public enum FileBusiTypeEnum {
	
	/** 1-附件上传 */
	UPLOAD(1, "附件上传"),
	/** 2-临时下载 */
	DOWNLOAD_TMP(2, "临时下载"),
	/** 3-临时上传 */
	UPLOAD_TMP(3, "临时上传"),
	/** 4-头像 */
	AVATAR(4, "头像"),
	;
	
	private int code;
	private String desc;
	
	private FileBusiTypeEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static FileBusiTypeEnum valueFrom(int code) {
		for (FileBusiTypeEnum v : values()) {
			if(v.code == code) {
				return v;
			}
		}
		return null;
	}
	
	public int getCode() {
		return code;
	}
	public String getDesc() {
		return desc;
	}
	

}
